ConvertDatabaseDriver Method (Database Object)

Use ConvertDatabaseDriver to convert the database driver DLL used by the report.

Syntax

Sub ConvertDatabaseDriver (pDLLName As String, blDoImmediateConvert as Boolean)

Parameters

Parameter Description

pDllName

Specifies the new DLL for the database driver.

blDoImmediateConvert

Specifies when the database driver will be converted. If True, the database driver is converted when the report is previewed, or the when the database is verified. If False, the database driver is converted when the report is refreshed in the preview window.

Remarks
Sample

The following code demonstrates how to convert the database driver to ODBC (P2sodbc.dll) using the ConverDataBaseDriver method. The ODBC data source is pointing to a Microsoft Access database.


'Instantiate the report object.
Set m_Report = New CrystalReport1

' Convert the database driver to ODBC.
m_Report.Database.ConvertDatabaseDriver "p2sodbc.dll", True

' Set the logon information for the ODBC data source.
' If the logon information is not set an error will be produced when the
' report is previewed or exported.
m_Report.Database.Tables(1).SetLogOnInfo "Xtreme Sample Database", "", 
"", ""

' Verify the database.
' If the database is not verified before exporting an error will be 
produced.
' If the database is not verified before previewing the report, the user 
may be
' prompted when the report is refreshed in the Crystal Report Viewer.
m_Report.Database.Verify



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com